/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Mouse;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import view.TableView;

/**
 *
 * @author Alex
 */
public class MouseManager extends MouseAdapter{
    /**
     * Xử lí khi click vào button trở về thư mục chứa file hiện hành
     * @param  e đối tượng MouseEvent
     */
    @Override
    public void mouseClicked(MouseEvent e)
    {
        if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2)
        {
            TableView table = (TableView) e.getSource();
            int rowIndex = table.rowAtPoint(e.getPoint());
            //int colIndex = _table.columnAtPoint(e.getPoint());
            Object o = table.getModel().getValueAt(rowIndex, 0);
            table.doClick(o);
        }
    }
}
